-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Make --enable-embed
libs respect --libdir
#12389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @petk, here's another build-related PR. Technically this PR addresses two separate concerns:
|
Bump @petk |
I'm onto this in the following days, thanks for your patience... |
I'll just recheck this a bit further but overall it's all ok. Yes, I totally agree that php-config script needs to have also embed info. Good suggestions. |
I'll just add note here to not forget when merging this... The approximate change for the php-config man page: diff a/scripts/man1/php-config.1.in b/scripts/man1/php-config.1.in
--- a/scripts/man1/php-config.1.in
+++ b/scripts/man1/php-config.1.in
@@ -39,6 +39,14 @@ Directory where extensions are searched by default
Directory prefix where header files are installed by default
.TP
.PD 0
+.B \-\-lib-dir
+Directory where libraries are installed by default
+.TP
+.PD 0
+.B \-\-lib-embed
+PHP embed library name
+.TP
+.PD 0
.B \-\-php-binary
Full path to php CLI or CGI binary
.TP |
And make locatable by via `php-config`. Prior to this, `libphp.*` would always install to `$prefix/lib`. After this, they will install to `$libdir`. In practice, this will make it so that programs embedding libphp can use `php-config` to determine appropriate compile flags without guessing. In `configure.ac`, it seems `$libdir` is mutated in some instances. Ideally the mutated version would be stored in `$phplibdir` or something. Instead of tracking down all uses of that variable, I introduced another variable `$orig_libdir` that holds the original value passed to the configure script. This is a no-op for users unless they are compiling with `--libdir` set to something other than `$prefix/lib`, the default.
de10975
to
04f99a7
Compare
Thank you @petk. I've incorporated your changes. |
@adsr thanks for your patience. Yes, it is taking abnormally long :) Issue is that I'm still checking how everything fits together. And merge is coming up soon here, no worries. What I'm currently also thinking is adding additional pkgconf template for PHP. Like an optional add-on:
So, it can be used together with pkgconf command-line utility. If PHP extensively already uses pkgconf for many dependencies, it should also provide pkgconf template for installation, I believe. And, I'll probably just sync these libdir names a bit. But this is just for the info, nothing to change in the PR... |
Thanks @adsr added to master branch (upcoming into PHP-8.4). We'll sync this further with pkgconf and the rest of the options in the future so this embed SAPI can be perhaps a bit easier to use. |
And make locatable by via
php-config
. Prior to this,libphp.*
would always install to$prefix/lib
. After this, they will install to$libdir
.In practice, this will make it so that programs embedding libphp can use
php-config
to determine appropriate compile flags without guessing.In
configure.ac
, it seems$libdir
is mutated in some instances. Ideally the mutated version would be stored in$phplibdir
or something. Instead of tracking down all uses of that variable, I introduced another variable$orig_libdir
that holds the original value passed to the configure script.This is a no-op for users unless they are compiling with
--libdir
set to something other than$prefix/lib
, the default.